package com.katze.common.ws.protocol;

public enum MessageType {

    AUTH, MESSAGE, PING, SHELL;

    private static final MessageType[] VALUES = values();

    public static MessageType resolve(String type) {
        for (MessageType item : VALUES) {
            if (item.name().equals(type.toUpperCase())) {
                return item;
            }
        }
        throw new IllegalArgumentException("No matching constant for [" + type + "]");
    }
}
